Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve support for adding public keys for deploys #1344

Merged
merged 1 commit into from
Dec 30, 2021

Conversation

swalkinshaw
Copy link
Member

Adding a deploy specific SSH public key to a Trellis server is a common task to enable CI/CD deploys (such as GitHub Actions).

This creates a standard folder (public_keys) for them. Any public SSH keys in that folder (ending in .pub) will be automatically added to the web_user as an authorized key.

@swalkinshaw swalkinshaw changed the title Add support for public keys for deploys Improve support for adding public keys for deploys Dec 29, 2021
@@ -55,7 +55,7 @@ def replace_item_with_key(obj, result):
)

if should_replace:
if 'key' in result._result[item]:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR exposed a bug in this code since result._result[item] was a string containing "key" (in public_keys) and Python's in operator is flexible for dict keys or substrings.

Adding a deploy specific SSH public key to a Trellis server is a common
task to enable CI/CD deploys (such as GitHub Actions).

This creates a standard folder (`public_keys`) for them. Any public SSH
keys in that folder (ending in `.pub`) will be automatically added to
the `web_user` as an authorized key.
@swalkinshaw swalkinshaw merged commit 2f92b67 into master Dec 30, 2021
@swalkinshaw swalkinshaw deleted the add-deploy-public-keys branch December 30, 2021 04:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants